/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package com.lcfgly.Database;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author lcfgly
 */
@Entity
@Table(name = "shop_prices")
@NamedQueries({
    @NamedQuery(name = "ShopPrices.findAll", query = "SELECT s FROM ShopPrices s")})
public class ShopPrices implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Basic(optional = false)
    @Column(name = "shopid")
    private int shopid;
    @Basic(optional = false)
    @Column(name = "product")
    private int product;
    @Basic(optional = false)
    @Column(name = "producttype")
    private short producttype;
    @Basic(optional = false)
    @Column(name = "price")
    private float price;
    @Basic(optional = false)
    @Column(name = "updatetime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updatetime;
    @Column(name = "priceimg")
    private String priceimg;

    public ShopPrices() {
    }

    public ShopPrices(Integer id) {
        this.id = id;
    }

    public ShopPrices(Integer id, int shopid, int product, short producttype, float price, Date updatetime) {
        this.id = id;
        this.shopid = shopid;
        this.product = product;
        this.producttype = producttype;
        this.price = price;
        this.updatetime = updatetime;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public int getShopid() {
        return shopid;
    }

    public void setShopid(int shopid) {
        this.shopid = shopid;
    }

    public int getProduct() {
        return product;
    }

    public void setProduct(int product) {
        this.product = product;
    }

    public short getProducttype() {
        return producttype;
    }

    public void setProducttype(short producttype) {
        this.producttype = producttype;
    }

    public float getPrice() {
        return price;
    }

    public void setPrice(float price) {
        this.price = price;
    }

    public Date getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(Date updatetime) {
        this.updatetime = updatetime;
    }

    public String getPriceimg() {
        return priceimg;
    }

    public void setPriceimg(String priceimg) {
        this.priceimg = priceimg;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ShopPrices)) {
            return false;
        }
        ShopPrices other = (ShopPrices) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.lcfgly.Database.ShopPrices[ id=" + id + " ]";
    }
    
}
